package com.infinit.easyreader.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 类：com.infinit.easyreader.entity.RankContent V[1.0.0]
 * 作用：排行數據的实体类
 * Created by rzy on 2016/6/22.
 */
public class RankContent implements Parcelable {
    public static final Creator<RankContent> CREATOR = new Creator<RankContent>() {
        @Override
        public RankContent createFromParcel(Parcel in) {
            return new RankContent(in);
        }

        @Override
        public RankContent[] newArray(int size) {
            return new RankContent[size];
        }
    };
    private long contentID;
    private String contentName;
    private String authorName;
    private int clickCount;
    private int favoriteCount;
    private int popularityCount;
    private int searchCount;
    private String payType;
    private String coverUrl;
    private String wapURL;
    private String wwwURL;

    public RankContent() {
    }

    protected RankContent(Parcel in) {
        contentID = in.readLong();
        contentName = in.readString();
        authorName = in.readString();
        clickCount = in.readInt();
        favoriteCount = in.readInt();
        popularityCount = in.readInt();
        searchCount = in.readInt();
        payType = in.readString();
        coverUrl = in.readString();
        wapURL = in.readString();
        wwwURL = in.readString();
    }

    public RankContent(String authorName, int clickCount, long contentID, String contentName, String coverUrl, int favoriteCount, String payType, int popularityCount, int searchCount, String wapURL, String wwwURL) {
        this.authorName = authorName;
        this.clickCount = clickCount;
        this.contentID = contentID;
        this.contentName = contentName;
        this.coverUrl = coverUrl;
        this.favoriteCount = favoriteCount;
        this.payType = payType;
        this.popularityCount = popularityCount;
        this.searchCount = searchCount;
        this.wapURL = wapURL;
        this.wwwURL = wwwURL;
    }

    public int getClickCount() {
        return clickCount;
    }

    public void setClickCount(int clickCount) {
        this.clickCount = clickCount;
    }

    public long getContentID() {
        return contentID;
    }

    public void setContentID(long contentID) {
        this.contentID = contentID;
    }

    public String getContentName() {
        return contentName;
    }

    public void setContentName(String contentName) {
        this.contentName = contentName;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public int getFavoriteCount() {
        return favoriteCount;
    }

    public void setFavoriteCount(int favoriteCount) {
        this.favoriteCount = favoriteCount;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public int getPopularityCount() {
        return popularityCount;
    }

    public void setPopularityCount(int popularityCount) {
        this.popularityCount = popularityCount;
    }

    public int getSearchCount() {
        return searchCount;
    }

    public void setSearchCount(int searchCount) {
        this.searchCount = searchCount;
    }

    public String getWapURL() {
        return wapURL;
    }

    public void setWapURL(String wapURL) {
        this.wapURL = wapURL;
    }

    public String getWwwURL() {
        return wwwURL;
    }

    public void setWwwURL(String wwwURL) {
        this.wwwURL = wwwURL;
    }

    public String getAuthorName() {

        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(contentID);
        dest.writeString(contentName);
        dest.writeString(authorName);
        dest.writeInt(clickCount);
        dest.writeInt(favoriteCount);
        dest.writeInt(popularityCount);
        dest.writeInt(searchCount);
        dest.writeString(payType);
        dest.writeString(coverUrl);
        dest.writeString(wapURL);
        dest.writeString(wwwURL);
    }
}
